<?php /* Smarty version 2.6.26, created on 2014-05-30 12:23:26
         compiled from admin/basket.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'geturl', 'admin/basket.tpl', 7, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'header.tpl', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'admin/leftcol.tpl', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<div id="left-area">
<div class="entry post clearfix width-for-all-img">
          <div class="breadcrumb">
            <span class="raquo"></span><a href="/">Главная</a>
           <span class="raquo"> &raquo; </span><a href="<?php echo smarty_function_geturl(array('controller' => 'admin','action' => 'index'), $this);?>
">Админ панель</a>  
           <span class="raquo"> &raquo; </span><a href="<?php echo smarty_function_geturl(array('controller' => 'admin','action' => 'basket'), $this);?>
">Все покупки</a>  
    </div>
    <h1 class="category-title">Все покупки</h1>
     <div class="product-filter">
       
        <div class="sort">Сортировка:      <select onchange="location = this.value;">
                <option value="?sort=id&amp;order=DESC<?php if ($this->_tpl_vars['type']): ?>&type=<?php echo $this->_tpl_vars['type']; ?>
<?php endif; ?>" <?php if ($this->_tpl_vars['sort'] == 'id' && $this->_tpl_vars['order'] == 'DESC'): ?>selected="selected"<?php endif; ?>>По умолчанию</option>
                 <option value="?sort=shopId&amp;order=ASC<?php if ($this->_tpl_vars['type']): ?>&type=<?php echo $this->_tpl_vars['type']; ?>
<?php endif; ?>" <?php if ($this->_tpl_vars['sort'] == 'shopId' && $this->_tpl_vars['order'] == 'ASC'): ?>selected="selected"<?php endif; ?>>Магазин (по возрастанию)</option>
                <option value="?sort=shopId&amp;order=DESC<?php if ($this->_tpl_vars['type']): ?>&type=<?php echo $this->_tpl_vars['type']; ?>
<?php endif; ?>" <?php if ($this->_tpl_vars['sort'] == 'shopId' && $this->_tpl_vars['order'] == 'DESC'): ?>selected="selected"<?php endif; ?>>Магазин (по убыванию)</option>
                <option value="?sort=userId&amp;order=ASC<?php if ($this->_tpl_vars['type']): ?>&type=<?php echo $this->_tpl_vars['type']; ?>
<?php endif; ?>" <?php if ($this->_tpl_vars['sort'] == 'userId' && $this->_tpl_vars['order'] == 'ASC'): ?>selected="selected"<?php endif; ?>>Пользователь (по возрастанию)</option>
                <option value="?sort=userId&amp;order=DESC<?php if ($this->_tpl_vars['type']): ?>&type=<?php echo $this->_tpl_vars['type']; ?>
<?php endif; ?>" <?php if ($this->_tpl_vars['sort'] == 'userId' && $this->_tpl_vars['order'] == 'DESC'): ?>selected="selected"<?php endif; ?>>Пользователь (по убыванию)</option>
                <option value="?sort=date&amp;order=ASC<?php if ($this->_tpl_vars['type']): ?>&type=<?php echo $this->_tpl_vars['type']; ?>
<?php endif; ?>" <?php if ($this->_tpl_vars['sort'] == 'date' && $this->_tpl_vars['order'] == 'ASC'): ?>selected="selected"<?php endif; ?>>Дата добавления (по возрастанию)</option>
                <option value="?sort=date&amp;order=DESC<?php if ($this->_tpl_vars['type']): ?>&type=<?php echo $this->_tpl_vars['type']; ?>
<?php endif; ?>" <?php if ($this->_tpl_vars['sort'] == 'date' && $this->_tpl_vars['order'] == 'DESC'): ?>selected="selected"<?php endif; ?>>Дата добавления (по убыванию)</option>
            </select>
        </div>
         <div class="type">На странице:      <select onchange="location = this.value;">
                <option value="<?php echo smarty_function_geturl(array('action' => 'basket'), $this);?>
" >Все покупки</option>
                <option value="?type=active" <?php if ($this->_tpl_vars['type'] == 'active'): ?>selected<?php endif; ?>>Активные</option>
                <option value="?type=finished" <?php if ($this->_tpl_vars['type'] == 'finished'): ?>selected<?php endif; ?>>Завершеные</option>
                <option value="?type=deviation" <?php if ($this->_tpl_vars['type'] == 'deviation'): ?>selected<?php endif; ?>>Отклоненые</option>
            
            </select>
        </div>
    
    </div>
    <table class="tdzayavki" width="100%">
        <thead>
            <tr> 
                <td>
                    <?php if ($this->_tpl_vars['sort'] == 'userId'): ?>
                    <a href="?sort=userId&order=<?php if ($this->_tpl_vars['order'] == 'desc'): ?>asc<?php else: ?>desc<?php endif; ?>" class="<?php echo $this->_tpl_vars['order']; ?>
">Пользователь</a>
                    <?php else: ?>
                    <a href="?sort=userId&order=<?php if ($this->_tpl_vars['order'] == 'desc'): ?>asc<?php else: ?>desc<?php endif; ?>">Пользователь</a>
                    <?php endif; ?>
                </td>
                <td>
                    <?php if ($this->_tpl_vars['sort'] == 'shopId'): ?>
                    <a href="?sort=shopId&order=<?php if ($this->_tpl_vars['order'] == 'desc'): ?>asc<?php else: ?>desc<?php endif; ?>" class="<?php echo $this->_tpl_vars['order']; ?>
">Магазин</a>
                    <?php else: ?>
                    <a href="?sort=shopId&order=<?php if ($this->_tpl_vars['order'] == 'desc'): ?>asc<?php else: ?>desc<?php endif; ?>">Магазин</a>
                    <?php endif; ?>
                </td>
                
                  <td>
                    <?php if ($this->_tpl_vars['sort'] == 'date'): ?>
                    <a href="?sort=date&order=<?php if ($this->_tpl_vars['order'] == 'desc'): ?>asc<?php else: ?>desc<?php endif; ?>" class="<?php echo $this->_tpl_vars['order']; ?>
">Дата</a>
                    <?php else: ?>
                    <a href="?sort=date&order=<?php if ($this->_tpl_vars['order'] == 'desc'): ?>asc<?php else: ?>desc<?php endif; ?>">Дата</a>
                    <?php endif; ?>
                </td>
                  <td>
                    <?php if ($this->_tpl_vars['sort'] == 'shopId'): ?>
                    <a href="?sort=status&order=<?php if ($this->_tpl_vars['order'] == 'desc'): ?>asc<?php else: ?>desc<?php endif; ?>" class="<?php echo $this->_tpl_vars['order']; ?>
">Статус</a>
                    <?php else: ?>
                    <a href="?sort=status&order=<?php if ($this->_tpl_vars['order'] == 'desc'): ?>asc<?php else: ?>desc<?php endif; ?>">Статус</a>
                    <?php endif; ?>
                </td>
              
                <td class="tb5">Действие</td>
            </tr>
        </thead>

       <?php $_from = $this->_tpl_vars['categories']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['d']):
?>
        <tr id="tr_<?php echo $this->_tpl_vars['d']->getId(); ?>
">
            <td class="" id="name_<?php echo $this->_tpl_vars['d']->getId(); ?>
">
                  <?php echo $this->_tpl_vars['d']->user->login; ?>

            </td>
            <td>
                <?php echo $this->_tpl_vars['d']->shop->nameshop; ?>

            </td>
            <td>
                <?php echo $this->_tpl_vars['d']->date; ?>

            </td>
            <td>
                <?php echo $this->_tpl_vars['d']->status; ?>

            </td>
            <td>
                 <a href="<?php echo smarty_function_geturl(array('route' => 'zakaz','id' => $this->_tpl_vars['d']->getId()), $this);?>
"><img src="/images/smotret.png" alt="Подробнее"></a>
             
                <a onclick="deletezakaz(<?php echo $this->_tpl_vars['d']->getId(); ?>
)" style="cursor: pointer"><img src="/images/index-07.png" alt="Удалить"></a>
                

            </td>

        </tr>
        <?php endforeach; endif; unset($_from); ?> 
    </table>      
       <br><br>
<div class="botline"></div>
<?php if ($this->_tpl_vars['pages'] > 1): ?>
<div class="wp-pagenavi">
<span class="pages">Страница <?php echo $this->_tpl_vars['p']; ?>
 из <?php echo $this->_tpl_vars['pages']; ?>
</span> 
<?php unset($this->_sections['page']);
$this->_sections['page']['loop'] = is_array($_loop=$this->_tpl_vars['pages']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['page']['name'] = 'page';
$this->_sections['page']['show'] = true;
$this->_sections['page']['max'] = $this->_sections['page']['loop'];
$this->_sections['page']['step'] = 1;
$this->_sections['page']['start'] = $this->_sections['page']['step'] > 0 ? 0 : $this->_sections['page']['loop']-1;
if ($this->_sections['page']['show']) {
    $this->_sections['page']['total'] = $this->_sections['page']['loop'];
    if ($this->_sections['page']['total'] == 0)
        $this->_sections['page']['show'] = false;
} else
    $this->_sections['page']['total'] = 0;
if ($this->_sections['page']['show']):

            for ($this->_sections['page']['index'] = $this->_sections['page']['start'], $this->_sections['page']['iteration'] = 1;
                 $this->_sections['page']['iteration'] <= $this->_sections['page']['total'];
                 $this->_sections['page']['index'] += $this->_sections['page']['step'], $this->_sections['page']['iteration']++):
$this->_sections['page']['rownum'] = $this->_sections['page']['iteration'];
$this->_sections['page']['index_prev'] = $this->_sections['page']['index'] - $this->_sections['page']['step'];
$this->_sections['page']['index_next'] = $this->_sections['page']['index'] + $this->_sections['page']['step'];
$this->_sections['page']['first']      = ($this->_sections['page']['iteration'] == 1);
$this->_sections['page']['last']       = ($this->_sections['page']['iteration'] == $this->_sections['page']['total']);
?>
<?php $this->assign('p', $this->_sections['page']['index_next']); ?>
 <?php if ($this->_tpl_vars['p'] == $this->_tpl_vars['page']): ?>
        <span class="current"><?php echo $this->_tpl_vars['p']; ?>
</span>
<?php else: ?>
    <?php if ($this->_tpl_vars['p'] == 1): ?>
        <a href="<?php echo smarty_function_geturl(array('action' => 'basket'), $this);?>
<?php if ($this->_tpl_vars['type']): ?>?type=<?php echo $this->_tpl_vars['type']; ?>
<?php endif; ?>" class="page smaller"><?php echo $this->_tpl_vars['p']; ?>
</a>
    <?php else: ?>
        <a href="<?php echo smarty_function_geturl(array('action' => 'basket'), $this);?>
?p=<?php echo $this->_tpl_vars['p']; ?>
<?php if ($this->_tpl_vars['type']): ?>&type=<?php echo $this->_tpl_vars['type']; ?>
<?php endif; ?>" class="page smaller"><?php echo $this->_tpl_vars['p']; ?>
</a>
    <?php endif; ?>
<?php endif; ?>
<?php endfor; endif; ?>
<span class="extend"> .... </span> 
<a href="<?php echo smarty_function_geturl(array('action' => 'basket'), $this);?>
?p=<?php echo $this->_tpl_vars['page']+1; ?>
<?php if ($this->_tpl_vars['type']): ?>&type=<?php echo $this->_tpl_vars['type']; ?>
<?php endif; ?>" class="nextpostslink">»</a> 
<a href="<?php echo smarty_function_geturl(array('action' => 'basket'), $this);?>
?p=<?php echo $this->_tpl_vars['pages']; ?>
<?php if ($this->_tpl_vars['type']): ?>&type=<?php echo $this->_tpl_vars['type']; ?>
<?php endif; ?>" class="last">Последняя»</a> 
</div>
<?php endif; ?>


</div>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "footer.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
